<template>
	<view class="p30">
		<view class="p30 bg-fff radius20">
			<view class="fw-w fs30">注销原因</view>
			<view class="flex row-between flex-wrap fs26 tc">
				<view class="radius50 pt20 pb20 mt30 w300 border line-1" :class="{'bg-zs color-fff':item.check}"
					@click="item.check=!item.check" v-for="(item,index) in list" :key="index">{{item.name}}
				</view>
			</view>
		</view>
		<view class="p30 bg-fff radius20 mt30">
			<view class="fw-w fs30">注销原因</view>
			<view class="pt30">
				<textarea class="w-max fs28" v-model="feedback" placeholder="请输入您的意见，我们会认真聆听"></textarea>
			</view>
		</view>
		<view class="h120"></view>
		<view class="pf bottom0 left0 w-max flex  bg-fff">
			<view class="p20 flex1">
				<u-button type="warning" ripple @click="submit()">提交</u-button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [],
				feedback:''
			};
		},
		onLoad() {
			this.list = this.$config.logoff_cause.map(e => {
				return {
					name: e,
					check: false
				}
			})
		},
		methods:{
			submit(){
				let params={
					feedback:this.feedback,
					cause:this.list.filter(e=>e.check).map(e=>e.name).join()
				}
				this.$jump('logout3',params)
			}
		}
	}
</script>

<style lang="scss">

</style>